import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooVueEditorItemsConfigController } from '../../../controllers';
const uctoovueEditorItemsConfigRouter = new Router();
const vueEditorItemsConfigController = new uctooVueEditorItemsConfigController();

uctoovueEditorItemsConfigRouter.post('/add', requireUser, vueEditorItemsConfigController.add);
uctoovueEditorItemsConfigRouter.post('/edit', requireUser, rowLevelPermission('uctoo/vue_editor_items_config'), vueEditorItemsConfigController.edit);
uctoovueEditorItemsConfigRouter.post('/del', requireUser, rowLevelPermission('uctoo/vue_editor_items_config'), vueEditorItemsConfigController.delete);

//For getting vueEditorItemsConfig with permission control
uctoovueEditorItemsConfigRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/vue_editor_items_config'), vueEditorItemsConfigController.getSingle);
uctoovueEditorItemsConfigRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/vue_editor_items_config'), vueEditorItemsConfigController.getMany);
uctoovueEditorItemsConfigRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/vue_editor_items_config'), vueEditorItemsConfigController.getMany);

//#endregion AutoCreateCode
export default uctoovueEditorItemsConfigRouter;
